# CI/CD

Languine provides a CI/CD integration to help you translate your application.

---

## How it Works

The CI/CD workflow in Languine follows a structured process to automate translation updates in your application:

### 1. Action Initialization
- The workflow begins when the action is triggered
- Sets up the necessary Git configuration and credentials

### 2. Languine Engine Processing
- The Languine engine processes your application's content
- Handles the translation tasks using the configured settings

### 3. Change Detection
The system checks for any translation changes and follows one of two paths:

**When Changes are Found:**
- Changes are committed to the repository
- Changes are pushed to the specified branch
- A Pull Request (PR) is created

**When No Changes are Found:**
- The workflow completes without creating a PR

### 4. Pull Request Creation
When changes are detected, a Pull Request is created with:

**PR Content:**
- Clear title indicating translation updates
- Detailed description of changes
- Quality check confirmations
- Instructions for review
- Links to documentation and support

**PR Description Includes:**
- Summary of translation updates
- List of what changed (updated translations, terminology consistency)
- Next steps for reviewers
- Links to documentation and support resources

---

## Workflow Diagram

<div className="flex flex-col items-center justify-center p-4 h-[400px] sm:h-[500px] md:h-[650px]">
  <pre
    className="p-4 text-sm leading-5 mb-4 scale-[0.5] sm:scale-[0.65] md:scale-90 transform-gpu"
    style={{
      fontFamily: "monospace",
      whiteSpace: "pre",
      textAlign: "left",
    }}
  >
    {`
                    ┌─────────────────────┐
                    │   Action Starts     │
                    └──────────┬──────────┘
                               │
                    ┌──────────▼──────────┐
                    │    Setup Git &      │
                    │    Credentials      │
                    └──────────┬──────────┘
                               │
┌─────────────────────────────────────────────────────────┐
│░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
│░░░░░░░░░░░░░░░░░░░░ Languine Engine ░░░░░░░░░░░░░░░░░░░░│
│░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
└─────────────────────────────────────────────────────────┘
                               │
                    ┌──────────▼──────────┐
                    │   Check Changes     │───────┐
                    └──────────┬──────────┘       │
                               │                  │
                               │ [Changes]        │ [No Changes]
                               │                  │
                    ┌──────────▼──────────┐       │
                    │   Commit & Push     │       │
                    └──────────┬──────────┘       │
                               │                  │
                    ┌──────────▼──────────┐       │
                    │    Create PR        │       │
                    └──────────┬──────────┘       │
                               │                  │
                    ┌──────────▼──────────┐       │
                    │        Done         │◄──────┘
                    └─────────────────────┘
`}
  </pre>
</div>

The workflow is designed to be automated while still allowing for human review and quality control before changes are merged into your codebase. It maintains version control best practices and ensures that translations are properly tracked and documented through the Git history.
